#pragma once
#ifndef SDEF_DOGINST
#define SDEF_DOGINST

#include <SypX/SypX.h>
#include "Instance.h"
#include "WolfInstance.h"
#include "Dog.h"

namespace SheepDefence
{
	class DogInstance : public Instance
	{
	
	public:

		// Attributes
		Dog* actor;
		WolfInstance* target, * next_target;
		std::vector<ObstacleInstance*> exceptions;
		float original_x, original_y, final_x, final_y, stamina;
		SypX::Mesh* staminaBarMesh;
		SypX::MeshInstance* staminaBar;
		SypX::SpriteInstance* targetSprite;

		
		// Constructors and Destructors
		DogInstance();
		~DogInstance();
		DogInstance(SypX::FileInputStream&, Dog*, Level*);
		DogInstance(Dog* act, Level* lvl, float x, float y, int angle);

		// Methods
		void boundaryCheck(Actor* actor);
		void move(float x, float y, bool force = false);
		void updateAttributes(SypX::Vec2 movement);
		void act(float);
		bool collide(Instance*);
		Actor* getActor();
		void drawStaminaBar();
	};
}

#endif